import numpy as np
from scipy.integrate import dblquad

# ∫e(-x^2-y^2), x ∈ [0,10], y ∈ [0,10]
def integrand(x, y):
    return np.exp(-(x**2) - y**2)


x_a = 0
x_b = 10
y_a = 0
y_b = 10

solution, abserr = dblquad(integrand, x_a, x_b, lambda x: y_a, lambda x: y_b)
print(solution, abserr)


# import sympy as sp
# from scipy.integrate import dblquad

# # ∫e(-x^2-y^2), x ∈ [0,10], y ∈ [0,10]
# def integrand(x, y):
#     return sp.exp(-(x**2) - y**2)


# x_a = 0
# x_b = 10
# y_a = 0
# y_b = 10

# solution, abserr = dblquad(integrand, x_a, x_b, lambda x: y_a, lambda x: y_b)
# print(solution, abserr)